home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / bin / warp / next / warp.h < prev    next >
C/C++ Source or Header  |  1993-05-22  |  1KB  |  60 lines

  1. #ifndef WARP_H
  2. #define WARP_H
  3.  
  4. #define MIN_A         .1
  5. #define MAX_A         10000.0
  6. #define DEF_A         (0.75 * MAX_A)
  7. #define MIN_B         0.0
  8. #define MAX_B         5.0
  9. #define DEF_B         4.0
  10.  
  11. #define DEF_OBJECT     "targetgeom"
  12.  
  13. #define DEF_INT_STEPS     10
  14.  
  15. #define DEF_GRIDX     3
  16. #define DEF_GRIDY     3
  17. #define DEF_GRIDZ     3
  18.  
  19. #define DEF_WIDGET_GEOM    "unitcube.off"
  20. #define DEF_WIDGET_SIZE    .1
  21.  
  22. #define DEF_PREFIX    "warp."
  23. #define DEF_PATH    "./"
  24.  
  25. #define WIDGET_NAMELEN 64
  26.  
  27. typedef char WidgetName[WIDGET_NAMELEN];
  28.  
  29. typedef struct {
  30.   HPoint3 RestLocation;
  31.   HPoint3 TransLocation;
  32.   Transform T;
  33.   float a, b;
  34. } WarpZone;
  35.  
  36. void WarpPoint(HPoint3 *old, HPoint3 *new, WarpZone *wz, int n_wz, 
  37.            int step, int totsteps);
  38. void WarpPointN(HPoint3 *old, HPoint3 *new, int n, WarpZone *wz, int n_wz,
  39.         int step, int totsteps);
  40.  
  41. #define WIDGET_NAME(s, i) sprintf((s), "ControlPoint%d", (i))
  42. #define WIDGET_GRIDNAME(s, x, y, z) \
  43.   sprintf((s), "Point_%d_%d_%d", (x), (y), (z))
  44.  
  45. void WidgetCreateAt(float x, float y, float z);
  46. void WidgetCreateAtNamed(float x, float y, float z, const char *name);
  47. void WidgetCreate(const char *name, float x, float y, float z, float scale,
  48.           const char *geom);
  49. void WidgetDelete(const char *name);
  50.  
  51. void WidgetLocation(const char *name, float x, float y, float z);
  52.  
  53. void WidgetGetTransform(const char *name, Transform T);
  54. void WidgetSetTransform(const char *name, Transform T);
  55.  
  56. void freeze();
  57. void thaw();
  58.  
  59. #endif /* WARP_H */
  60.